using YL.Utils.Pub;

namespace YL.Utils.Table
{
    public class Microprogram {
        public static object DataInfo(object data, int code) 
        {
            var jsonData = new {
                code,               
                data
            };
            return jsonData;
        }

        public static object DataInfo(PubEnum code, string msg, object data) 
        {
            var jsonData = new 
            {
                code,
                msg,
                data
            };
            return jsonData;
        }

        public static object GridData(object data, int total, int code) 
        {
            var jsonData = new {
                code = code,
                data = data,
                total = total
            };
            return jsonData;
        }
    }
}